package me.w70.bot.gui.rs;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;

import me.w70.bot.Bot;

public class Painter extends Thread {

	public Painter() {
		start();
	}

	public void draw(Graphics g) {
		try {
			g.setColor(new Color(255, 0, 0, 50));
	//		g.fillRoundRect(0, 0, 200, 200, 10, 10);
			g.setColor(Color.WHITE);
		g.drawString("X:" + Bot.methods.getClient().getMouseX(), 40, 10);
			g.drawString("Y:" + Bot.methods.getClient().getMouseY(), 50, 20);
		//	g.fillOval(Bot.gui.rs.mouseManager.botX - 3,
		//			Bot.gui.rs.mouseManager.botY - 3, 6, 6);

			//g.drawImage(Bot.painter.getMouse(), Bot.gui.rs.mouseManager.botX - 3, Bot.gui.rs.mouseManager.botY - 3,null);
			int x = Bot.gui.rs.mouseManager.botX - 0;
			int y = Bot.gui.rs.mouseManager.botY - 0;
			int width = 2;
		/*
			Graphics2D g2d = (Graphics2D)g;

		    g2d.setStroke(new BasicStroke(width));

			g2d.drawLine(x-6, y+6, x+6, y-6);
			g2d.drawLine(x-6, y-6, x+6, y+6);
		*/
			g.fillOval(x,y,6,6);
			// Object[] p = NBot.methods.getNPCArray();

			// int x = vp[0];

			// g.drawString(p.getName(), r.x, r.y);
			Thread.sleep(1L);
			/*
			 * g.drawString("ANI: " +
			 * NBot.methods.getMyPlayer().getScreenLocation(), 10, 30);
			 */

		} catch (Exception e) {

		}
	}

	public void run() {
		/*
		 * for (;;) {
		 * 
		 * try { Graphics g = (Graphics) NBot.methods.getCanvas()
		 * .getClass().getSuperclass().getDeclaredField( "canvasGraphics").get(
		 * NBot.methods.getCanvas());
		 * 
		 * g.setColor(Color.RED); g.drawString("LOL", 20, 20); try {
		 * Thread.sleep(5); } catch (InterruptedException e) {
		 * e.printStackTrace(); } } catch (Exception e) { e.printStackTrace();
		 *  } }
		 */
	}

}
